package com.game.euchre;

public class Trump {
	
	int isTrump = 1;
	
	/*
	 
	Suit 1:
	 V0 = 9hearts
	 	Trump = 0/1
	 V1 = 10hearts
	 V2 = Jhearts
	 V3 = Qhearts
	 V4 = Khearts
	 V5 = AHearts
	
	Suit 2:
	 V6 = 9 diamond
	 v7 = 10 diamond
	 v8 = j diamond
	 v9 = q diamond
	 v10 = k diamond
	 v11 = a diamond
	 
	Suit 3: 
	 v12 = 9 spade
	 v13 = 10 spade
	 v14 = j spade
	 v15 = q spade 
	 v16 = k spade
	 v17 = A spade
	 
	Suit 4: 
	 v18 = 9 clubs
	 v19 = 10 clubs
	 v20 = j clubs
	 v21 = q clubs 
	 v22 = k clubs 
	 v23 = A clubs
	 
	*/
	public int dealerLocation;
	public int currentDealer(int dealerLocation){
		
		dealerLocation++;
		return dealerLocation;
	}
	
	public static int currentPlayer(int playerLocation){
		
		playerLocation++;
		return playerLocation;
		
	}
	
	public void trumpValues(int trumpChoice, Card hand1[], Card hand2[], Card hand3[], Card hand4[]){
		
			Card trump = new Card(0, 0 , 0, 0);
			
			int oppositeColor = -1;
				switch(trumpChoice)
				{
					case 0: oppositeColor = 1;
					case 1: oppositeColor = 0;
					case 2: oppositeColor = 3;
					case 3: oppositeColor = 2;
				}
			
			for (int i=0; i < hand1.length; i++)
			{	
				if (hand1[i].getSuit() == trumpChoice || (hand1[i].getSuit() == oppositeColor && hand1[i].value == 8))
				{
					trump.changeSuit(hand1,  i);
					trump.changeTrump(hand1, i);
					trump.changeRank(hand1);
				}
				
				if (hand2[i].getSuit() == trumpChoice || (hand2[i].getSuit() == oppositeColor && hand2[i].value == 2))
				{
					trump.changeSuit(hand2,  i);
					trump.changeTrump(hand2, i);
					trump.changeRank(hand2);
				}	
				
				if (hand3[i].getSuit() == trumpChoice || (hand3[i].getSuit() == oppositeColor && hand3[i].value == 20))
				{
					trump.changeSuit(hand3,  i);
					trump.changeTrump(hand3, i);
					trump.changeRank(hand3);
				}
				
				if (hand4[i].getSuit() == trumpChoice || (hand4[i].getSuit() == oppositeColor && hand4[i].value == 14))
				{
					trump.changeSuit(hand4,  i);
					trump.changeTrump(hand4, i);	
					trump.changeRank(hand4);
				}
			}
		
		//Manipulate the trump values of cards
		//change the Card array trump to 1 and change the jack of the same color's value to trump suit and make its value 1. Make the jack of the same suit value to 0. 
		
	}

}
